package dome5;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 二进制
 * User: 王圆豪
 * Date: 2024-07-17
 * Time: 16:05
 */
public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int l = sc.nextInt();
        int r = sc.nextInt();
        int add = 0;
        for (int i = l; i <= r; i++) {
            int tmp = i;
            while (tmp > 0) {
                add += tmp & 1;
                tmp >>= 1;
            }
        }
        System.out.println(add %= 998244353);
    }
}
